package com.zq.create.abstract_factory;

import java.util.Objects;

public class Client {
    AbstractProductA productA;
    AbstractProductB productB;

    public Client(AbstractFactory factory) {
        Objects.requireNonNull(factory);

        productA = factory.createProductA();
        productB = factory.createProductB();
    }

    public void run() {
        productA.interact(productB);
    }
}
